import request from "@/utils/request";
import { R, page, PageQuery, emptyPageInfo } from "@/api/common/type";
import {Order,OrderResponse} from '@/api/orders/type'


enum API {
    ORDER_PAGE_URL = "/order/orders",
    ORDER_ONE_URL = "/order/one",
    ORDER_ADD_URL = "/order/add",
    ORDER_UPDATE_URL = "/order/update",
    ORDER_DEL_URL = "/order/delete",
}
 

//获取订单的分页数据
export const reqOrdersPage = (query: any) => request.post<any, OrderResponse>(API.ORDER_PAGE_URL, query)

//查询单个订单
export const reqOrderOne = (id: any) => request.get<any, R<Order>>(API.ORDER_ONE_URL + `?id=` + id)

//删除订单
export const reqOrderDel = (id: any) => request.delete<any, R<boolean>>(API.ORDER_DEL_URL + `?id=` + id)






